import http from '_u/http.js';

export default {
    getCourseList: (params) => {
        return http.get('/course/page', {params}
        )
    },
    getCourseInfo: (params) => {
        return http.get('/course/info', {
            params
        })
    },
    getSimpleCourseDirs: (params) => {
        return http.get(`/course/getSimpleCourseDirs`, {
            params
        })
    },
    getDetailCourseDirs: (params) => {
        return http.get(`/course/getDetailCourseDirs`, {params})
    },
    getEvaluations: (params) => {
        return http.get(`/course/evaluation/page`, {
            params
        })
    },

    getSectionContentDetail:(params)=>{
        return http.get(`/section-content/info`, {
            params
        })
    },

    saveDiscussComment:(data)=>{
        return http.post('/course/comment/create', data);
    },

    getCourseQuestions: (params) => {
        return http.get(`/section/question/page`, {
            params
        })
    },
    getCourseDiscussions: (courseId) => {
        return http.get(`/course/discussions`, {
            params: {
                courseId
            }
        })
    },
    getCourseNotice: (params) => {
        return http.get(`/course/queryNotice`, {
            params
        })
    },
    getCourseExams: (courseId) => {
        return http.get(`/course/exams`, {
            params: {
                courseId
            }
        })
    },


    updateProcess: (params) => {
        return http.get(`/section-content/updateProcess`, {
            params
        })
    }

}
